home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 577 b | 41 lines | [TEXT/CWIE] |
- // Postponer.h
-
- #ifndef Postponer_h
- #define Postponer_h
-
- #ifndef ListLink_h
- #include "ListLink.h"
- #endif
- #ifndef Tick_h
- #include "Tick.h"
- #endif
- #ifndef ListOf_h
- #include "ListOf.h"
- #endif
-
- class Method;
-
- class Postponer
- {
- private:
- ListLink< Postponer > link;
- const Method& perform;
-
- static ListOf< Postponer >& TheList();
-
- public:
- Postponer( const Method& );
- ~Postponer();
-
- bool Pending() const { return link.Owned(); }
- void Schedule();
- void Cancel();
-
- void Flush();
-
- static void Execute( Tick stop );
- static bool CanSleep();
- };
-
- #endif
-